package com.hnust.root.dao.entity.domain.forward;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 话题表
 */

@Data
@TableName("topic")
public class Topic {
    private static final long serialVersionUID = 1L;
    @TableId
    private int id;

    @TableField("content")
    //话题的内容
    private String content;

    @TableField("location")
    //发表话题的用户所处的地区
    private String location;

    @TableField("nickName")
    //发表用户的昵称
    private String nickName;

    @TableField("university")
    //发表用户的学校
    private String university;

    //发布者的openID
    @TableField("open_id")
    private String openId;

    @TableField(exist = false)
    private WxUserInfo userInfo;

    //话题创建时间
    @TableField("create_time")
    private Date createTime;

    //话题更新时间
    @TableField("update_time")
    private Date updatedAt;

    /**
     * 话题的状态
     * 0-正常
     * 1-已删除
     * 2-被举报
     */
    @TableField("status")
    private int status;

    /**
     * 被举报的原因
     */
    @TableField("tip_off")
    private String tipOff;

    //用户点赞的数量
    @TableField("like_count")
    private int likeCount;

    //当前请求用户是否点赞
    @TableField(exist = false)
    private boolean hasLiked;

    //评论数
    @TableField("comment_count")
    private int commentCount;

}
